package com.project.dao;/*
 *当前的项目名：project
 *当前编辑文件名：AdminInfoDAOTest
 *当前用户的登录名：17673122251
 *当前系统日期：2022/5/5
 *当前系统时间：18:05
 */

import com.project.dao.impl.AdminInfoDAOImpl;
import com.project.entity.AdminInfo;
import org.junit.Test;

import java.sql.SQLException;
import java.util.Date;

public class AdminInfoDAOTest {
    private AdminInfoDAO dao=new AdminInfoDAOImpl();

    @Test
    public void insert() throws SQLException {
        dao.insert(new AdminInfo(null,"admin01","123456",new Date()));
    }

    @Test
    public void select() throws SQLException {
        System.out.println(dao.selectById(1));
        System.out.println(dao.select(0,5));
    }

    @Test
    public void delete() throws SQLException {
        dao.deleteById(1);
    }

    @Test
    public void update() throws SQLException{
        dao.updateById(new AdminInfo(2,"boboji","654321",new Date()));
    }
}
